﻿<!DOCTYPE html>
<html>
<head>
	<title>风电预测</title>
	<style type="text/css">
	body,html{
		padding:0;
		margin:0;
		border:0;
		/*background-image: url(images/back.png);*/
		background-size: 100% 100%;
		height:100%;
		width:100%;
		overflow: hidden;
		min-width: 1300px;
		min-height: 600px;
	}
	.head{
		background-image: url(images/head.png);
		background-size: 100% 100%;
		width: 100%;
		height:90px;
		/*border-bottom: 1px solid grey;*/
		text-shadow:6px 7px 6px grey;
		color:black;
	}
	h1{
		padding:0;
		margin:0;
		border:0;
		height: 50px;
		line-height: 50px;
		text-align: left;
		font-size: 45px;
		font-family: 隶书;
		font-style: italic;
		margin-left: 15%;
		letter-spacing: 20px;

	}
	h3{
		padding:0;
		margin:0;
		border:0;
		text-align: left;
		height: 20px;
		line-height: 20px;
		font-size: 20px;
		font-family: 隶书;
		/*font-style: italic;color:darkgrey;*/
		margin-left: 24%;
		letter-spacing: 5px;
		word-spacing: 20px;
	}
	.head img{
		float: left;
		width: 90px;
		padding-top:2px;
		padding-left:3%;
	}
	.head p{
		float: left;
	}
	.hr{
		width: 100%;
		height: 15px;
		background:-webkit-linear-gradient(to bottom, rgb(117,156,108) 0%, rgb(255,255,255) 50%,rgb(255,255,255) 50%,rgb(117,156,108) 100%);
		background:linear-gradient(to bottom, rgb(117,156,108) 0%, rgb(255,255,255) 50%,rgb(255,255,255) 50%,rgb(117,156,108) 100%);
		background:-moz-linear-gradient(to bottom, rgb(117,156,108) 0%, rgb(255,255,255) 50%,rgb(255,255,255) 50%,rgb(117,156,108) 100%);
	}
	.main{
		width: 100%;
		margin-top: 2px;
		min-height:500px;
		height: 100%;
	}
	.left{
		float: left;
		width: 210px;
		border-radius: 10px;
		margin-left: 5px;
		height: 100%;
		background:-webkit-linear-gradient(to right, rgb(117,156,108) 0%, rgb(255,255,255) 35%,rgb(201,255,200) 50%,rgb(255,255,255) 65%,rgb(117,156,108) 100%);
		background:linear-gradient(to right, rgb(117,156,108) 0%, rgb(255,255,255) 35%,rgb(210,255,200) 50%,rgb(255,255,255) 65%,rgb(117,156,108) 100%);
		background:-moz-linear-gradient(to right, rgb(117,156,108) 0%, rgb(255,255,255) 35%,rgb(210,255,200) 50%,rgb(255,255,255) 65%,rgb(117,156,108) 100%);
	}
	.right{
		border:0;
		height: 100%;
		margin-left: 220px;
		margin-right: 5px;
		min-width: 900px;
		border-radius: 10px;
		background:-webkit-linear-gradient(to right bottom, rgb(117,156,108) 0%, rgb(255,255,255) 45%,rgb(255,255,255) 50%,rgb(117,156,108) 100%);
		background:linear-gradient(to right bottom, rgb(117,156,108) 0%, rgb(255,255,255) 45%,rgb(255,255,255) 50%,rgb(117,156,108) 100%);
		background:-moz-linear-gradient(to right bottom, rgb(117,156,108) 0%, rgb(255,255,255) 45%,rgb(255,255,255) 50%,rgb(117,156,108) 100%);
	}
	ul{
		width: 100%;
		border:0;
		padding:0;
		margin: 0;
		margin-top: 20%;
	}
	ul li{
		list-style: none;
		width: 80%;
		text-align: center;
		margin-left: 10%;
		/*background-color: red;*/
		height: 40px;
		line-height: 40px;
		margin-bottom: 30px;s
		border-radius: 5px;
	}
	a{
		text-decoration: none;
		font-weight:800;
		color:black; 
	}
	</style>
	<script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="js/angular-1.3.0.js"></script>
	<script type="text/javascript" src="js/angular-route.min.js"></script>

</head>
<body  ng-app="myApp">
<div class="head"><img src="images/logo.png">
	<h1>风电预测系统</h1>
	<h3>Wind power prediction system</h3>
	<!-- <p>登陆</p> -->
</div>
<div class="hr"></div>
<div class="main" id="main" ng-controller="myController">
    <div class="left">
    	<ul>
    		<li><a href="#/input">计算机系</a></li>
    		<li><a href="#/MeasuringPoint">电气工程系</a></li>
    		<li><a href="#/equipment">自动化系</a></li>
    		<li><a href="#/demo1">机械工程系</a></li>
    	</ul>
    </div>
	<div class="right" ng-view ></div>
	
</div>
<script type="text/javascript">
	angular.module("myApp",['ngRoute'])
	.controller("myController",function($scope){

	})
	.controller("rest",function($scope){

	})
	.controller("HelloCtroller",function($scope){

	})
	.controller("equipment",function($scope){

	})
	.config(['$routeProvider',function($routeProvider){
        $routeProvider
        .when('/',{
            templateUrl:'input.html',
            controller:'rest'
        })
        .when('/MeasuringPoint',{
            templateUrl:'MeasuringPoint.html',
            cantroller:"HelloCtroller"
        })
        .when('/equipment',{
            templateUrl:'equipment.html',
            cantroller:"equipmentCon"
        })
        .when('/demo1',{
        	templateUrl:"demo1.html"
        })
        .otherwise({
          redirectTo: '/'
        });
    }])
</script>
<script type="text/javascript">
$(function(){
	var w=$("body").width();
	// alert(w)
	var wid=w-15;
	$("#right").width(wid)
})
</script>
<script type="text/javascript">

// var mouseBeginX,mouseBeginY;//鼠标初始位置

// $(function(){

// 	$.ajax({
// 		url: 'example.txt',
// 		type: 'POST',
// 		dataType: 'html',
// 		async:false
// 	})
// 	.done(function(data) {
// 		console.log("success");
// 		$(".right").html(data)
// 	})
// 	.fail(function() {
// 		console.log("error");
// 	})
// 	.always(function() {
// 		console.log("complete");
// 	}).responseText;
// 	// $("body").html=str;
// 	$(".model").css('display', 'none');
	

//     var content1;
//     var left=220;
//     var leftt=left+50;
//     // alert(leftt)

// 		 var moveDialog;
// 		 	moveDialog=document.getElementsByTagName("section");
// 	function clock(){
// 		for (var i = 0;i<moveDialog.length;i++) {

// 			//遍历节点，动态添加删除id属性
// 		    $(moveDialog[i]).live("mousedown",function(e){
// 		    	mouseBeginX=e.pageX;
// 				mouseBeginY=e.pageY;
// 		    	if ((mouseBeginX<270 && mouseBeginY<170)&&(mouseBeginX>220 && mouseBeginY>120)) {
// 		    		this.setAttribute("id","dialog");
// 		    	}else{
// 		    		// this.setAttribute("id","dialog");
// 		    	};
// 				 // this.setAttribute("id","dialog");
// 			})
// 			$(moveDialog[i]).live("mouseup",function(e){
// 				// alert("")
// 				this.removeAttribute("id","dialog");
// 				var classname="x"+e.pageX+"y"+e.pageY;
// 				 //console.log(classname)
// 				 this.setAttribute("id",classname);
// 				 content1=this.getAttribute("id");
// 			})
// 			$(moveDialog[i]).hover(function() {
// 				/* Stuff to do when the mouse enters the element */
// 				  $(this).children('p').css('display', 'block');
// 			}, function() {
// 				/* Stuff to do when the mouse leaves the element */
// 				//console.log("end")
// 				$(this).children('p').css('display', 'none');
// 				// content1=this.getAttribute("id");
// 			});
// 			$(moveDialog[i]).live("dblclick",function(){
// 				if (mouseBeginX>270 && mouseBeginY>170) {
// 		    		this.setAttribute("id","dialog");
// 		    	}else{
// 		    		// this.setAttribute("id","dialog");
// 		    	};
// 			})

// 		 }; 
// 		}
//     // }

// 	//获取元素对象
// 	function g(id){return document.getElementById(id);}
  	
// 	var mouseOffsetX = 0;
// 	var mouseOffsetY = 0;

// 	var isDialoging=false;

// 	$("#dialog").live("mousedown",function(e){
// 		var e=e||window.event;
// 		mouseOffsetX = e.pageX-g("dialog").offsetLeft;
// 		mouseOffsetY = e.pageY-g("dialog").offsetTop;

// 		isDialoging=true;
// 	})

// 	document.onmousemove=function(e){
// 		var e=e||window.event;
// 		var mouseX=e.pageX;//鼠标当前位置
// 		var mouseY=e.pageY;

// 		var moveX=0;
// 		var moveY=0;

// 		if (isDialoging===true) {
// 			moveX=mouseX-mouseOffsetX;
// 			moveY=mouseY-mouseOffsetY;

// 			var pageWidth=document.documentElement.clientWidth;
// 			var pageHeight=document.documentElement.clientHeight;

// 		    var dialogWidth=g("dialog").offsetWidth;
// 		    var dialogHeight=g("dialog").offsetHeight;	

// 		    var maxX=pageWidth - dialogWidth;
// 		    var maxY=pageHeight - dialogHeight;

// 		    moveX = Math.min(maxX,Math.max(left,moveX));
// 		    moveY = Math.min(maxY,Math.max(110,moveY));

// 			g("dialog").style.left=moveX+"px";
// 			g("dialog").style.top=moveY+"px";
// 		};

// 	}

// 	document.onmouseup=function(e){
// 		isDialoging=false;
// 		//console.log(e.pageX);

// 		var mouseEndX,mouseEndY,changeX,changeY;
// 		mouseEndX=e.pageX;//鼠标结束位置
// 		mouseEndY=e.pageY;

// 		changeX=mouseEndX-mouseBeginX;
// 		changeY=mouseEndY-mouseBeginY;

// 		if (((mouseBeginX<leftt && mouseBeginX>left)  &&  (mouseBeginY<160 && mouseBeginY>110) ) &&  (changeX>0 || changeY>0)){
// 				//判断位移和初始位置，是否添加节点
// 		    	$("#content").append("<section class='ui-dialog'><p><span>名称：</span><span id='inputname'></span><br/><span>功率：</span><span id='inputwork'></span></p></section>");
// 		    	$(".model").css('display', 'block');
// 		};

// 		moveDialog=document.getElementsByTagName("section");
// 		clock();
// 	}
// 	$("legend").on("click",function(){
// 		$(".model").css('display', 'none');
// 		// alert("123")
// 	})
// 	$("#ensure").on("click",function(){
// 		 $(".model").css('display', 'none');
// 		 $('#'+content1).children('p').children("#inputname").text($("#name").val());
// 		 $('#'+content1).children('p').children("#inputwork").text($("#work").val());
// 		 console.log(content1)
// 		 console.log($('#'+content1).children('p').html())
// 		 console.log($("#name").val())
// 	})

// 	$("#ansure2").on("click",function(){
// 		alert($("body").html())
// 	})
	
// })
</script>
</body>
</html>